﻿using DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Excel.WorksheetElements
{
    [XmlRoot("iconSet", Namespace = Constants.ExcelMain)]
    public class IconSet : XmlSerializable
    {
        /// <summary>
        /// Conditional Format Value Object
        /// </summary>
        [XmlElement("cfvo", Namespace = Constants.ExcelMain)]
        public XmlList<CFVO> Cfvos { get; set; }

        [Optional]
        [XmlAttribute("iconSet", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_IconSetType> Value { get; set; }

        [Optional]
        [XmlAttribute("reverse", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> ReverseIcons { get; set; }

        [Optional]
        [XmlAttribute("percent", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> Percent { get; set; }

        [Optional]
        [XmlAttribute("showValue", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> ShowValue { get; set; }

        public IconSet()
        {
            Cfvos = new XmlList<CFVO>();
        }
    }
}
